package com.ruoyi.myplayer.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.myplayer.mapper.PlayerPlaylistMapper;
import com.ruoyi.myplayer.domain.PlayerPlaylist;
import com.ruoyi.myplayer.service.IPlayerPlaylistService;

import javax.annotation.Resource;

/**
 * 歌单Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-04-07
 */
@Service
public class PlayerPlaylistServiceImpl implements IPlayerPlaylistService 
{
    @Resource
    private PlayerPlaylistMapper playerPlaylistMapper;

    /**
     * 查询歌单
     * 
     * @param id 歌单主键
     * @return 歌单
     */
    @Override
    public PlayerPlaylist selectPlayerPlaylistById(Long id)
    {
        return playerPlaylistMapper.selectPlayerPlaylistById(id);
    }

    /**
     * 查询歌单列表
     * 
     * @param playerPlaylist 歌单
     * @return 歌单
     */
    @Override
    public List<PlayerPlaylist> selectPlayerPlaylistList(PlayerPlaylist playerPlaylist)
    {
        return playerPlaylistMapper.selectPlayerPlaylistList(playerPlaylist);
    }

    /**
     * 新增歌单
     * 
     * @param playerPlaylist 歌单
     * @return 结果
     */
    @Override
    public int insertPlayerPlaylist(PlayerPlaylist playerPlaylist)
    {
        return playerPlaylistMapper.insertPlayerPlaylist(playerPlaylist);
    }

    /**
     * 修改歌单
     * 
     * @param playerPlaylist 歌单
     * @return 结果
     */
    @Override
    public int updatePlayerPlaylist(PlayerPlaylist playerPlaylist)
    {
        return playerPlaylistMapper.updatePlayerPlaylist(playerPlaylist);
    }

    /**
     * 批量删除歌单
     * 
     * @param ids 需要删除的歌单主键
     * @return 结果
     */
    @Override
    public int deletePlayerPlaylistByIds(Long[] ids)
    {
        return playerPlaylistMapper.deletePlayerPlaylistByIds(ids);
    }

    /**
     * 删除歌单信息
     * 
     * @param id 歌单主键
     * @return 结果
     */
    @Override
    public int deletePlayerPlaylistById(Long id)
    {
        return playerPlaylistMapper.deletePlayerPlaylistById(id);
    }

    @Override
    public List<Map<String, Object>> getPickPlayLst() {
        return playerPlaylistMapper.getPickPlayLst();
    }
}
